It is known to provide data encoding pattern on products, for example documents, so that a hand held device, such as a pen, can read the data encoded in the pattern and use it, for example, to detect its position as it is moved over the document. Where the hand held device is a pen arranged to mark the product, the position of marks made on the documents can be detected by the pen, thereby enabling the position of the marks on the document to be stored electronically as they are made.